package com.school.entity;

/**
 * 课程类：关联教师和学生
 */
public class Course {
    // 私有属性：仅本类可直接访问，外部需通过Getter/Setter
    private final String courseId;    // 课程编号
    private final String courseName;  // 课程名称
    private final String location;    // 上课地点
    private final String time;        // 上课时间
    private Teacher teacher;    // 授课教师（关联Teacher对象）

    // 构造方法
    public Course(String courseId, String courseName, String location, String time) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.location = location;
        this.time = time;
    }

    // Getter和Setter方法（控制属性访问）
    public String getCourseId() {
        return courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public String getLocation() {
        return location;
    }

    public String getTime() {
        return time;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }
}